package com.dgw.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.servlet.ModelAndView;

/**
 * @program: spring-boot-web-jsp
 * @description:
 * @author: Mr.Dai
 * @create: 2019-11-26 23:03
 **/
@RestController
public class HelloController {

    @GetMapping("/hello")
    public ModelAndView hello(ModelAndView modelAndView){
        modelAndView.addObject("msg","Hello JSP");
        modelAndView.setViewName("success");
        return modelAndView;
    }
}
